package com.xaicode.learn.netty.dubborpc.provider;

import cn.hutool.core.util.StrUtil;
import com.xaicode.learn.netty.dubborpc.interfaces.HelloService;
import lombok.extern.slf4j.Slf4j;

/**
 * @author Locker xaicode@sina.com
 * @version 1.0
 * @date 2021/6/20 0020 21:24
 */
@Slf4j
public class HelloServiceImpl implements HelloService {

    @Override
    public String hello(String msg) {
        log.info("receive client msg: {}", msg);
        return StrUtil.isNotBlank(msg) ?
                String.format("hello client, I already accept your msg: %s", msg) :
                String.format("hello client, I already accept your msg for empty");
    }
}
